﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Mongaba.Core.Enumerators;
using System.ServiceModel;
using Mongaba.Core.DataContracts;
using System.Net;

namespace Mongaba.Core.ServiceContracts
{
    [ServiceContract(Name = "IMongabaProcess")]
    internal interface IMongabaProcess
    {
        [OperationContract(Name = "getId", IsOneWay = false)]
        string getId();

        [OperationContract(Name = "getConnectionTime", IsOneWay = false)]
        DateTime getConnectionTime();

        [OperationContract(Name = "ReceiveMessage", IsOneWay = true)]
        void ReceiveMessage(MessageContract m);

        [OperationContract(Name = "ReceiveCoordination", IsOneWay = false)]
        bool ReceiveCoordination();

        [OperationContract(Name = "getStatus", IsOneWay = false)]
        ProcessStatus getStatus();

        [OperationContract(Name = "getProcessUser", IsOneWay = false)]
        UserContract getProcessUser();

        [OperationContract(Name = "getProcessGroup", IsOneWay = false)]
        GroupContract getProcessGroup();

        [OperationContract(Name = "ReveiveProcessList", IsOneWay = true)]
        void ReveiveProcessList(ProcessContract[] plist);

        [OperationContract(Name = "RenewScore", IsOneWay = true)]
        void RenewScore();

        [OperationContract(Name = "getContract", IsOneWay = false)]
        ProcessContract getContract();

        [OperationContract(Name = "getScore", IsOneWay = false)]
        float getScore();

        [OperationContract(Name = "Ping", IsOneWay = false)]
        bool Ping();

        [OperationContract(Name = "ReceiveNewCoordinator", IsOneWay = true)]
        void ReceiveNewCoordinator(string newCoordAddress);


        [OperationContract(Name = "BeginReceiveFile", IsOneWay = false)]
        bool BeginReceiveFile(string fileName,string operationGuid, long fileBytes, ProcessContract pContract);

        [OperationContract(Name = "ReceiveFilePart", IsOneWay = false)]
        bool ReceiveFilePart(string operationGuid, byte[] data, int offset, int count, ProcessContract pContract);

        [OperationContract(Name = "CancelReceiveFile", IsOneWay = true)]
        void CancelReceiveFile(string operationGuid, ProcessContract pContract);

        [OperationContract(Name = "EndReceiveFile", IsOneWay = true)]
        void EndReceiveFile(string operationGuid, ProcessContract pContract);

       

    }
}
